import {reqSearchList} from '@/api'
const actions={
    async searchList(context,query){
       const result = await reqSearchList(query)
       console.log('result结果',result)
        if(result.code===200){
           context.commit('GET_SEARCH_LIST',result.data)
        //    console.log('search成功');
           console.log(result.data);
        }else{
            console.log('search失败');
        }
    }
}
const state={
    getsearchlist:[],
}
const mutations={
    GET_SEARCH_LIST(state,list){
        state.getsearchlist=list
    }
}
export default {
    namespaced:true,
    state,
    mutations,
    actions,
}